/**
 * A class that represents a position of cookies.
 * 
 * Invariants: dough != null; shape !=null; count > 0; if a filling is provided -> DoubleCookie
 */
@Author("Lajos-Zoltan Zsombori")
public class Position {
		
	private Dough dough = null;
	private Shape shape = null;
	private Fill filling = null;
	private int count = 0;
	
	/**
	 * Creates a new position of cookies of the provided shape, made of the provided dough and an optional filling.
	 * 
	 * @param d
	 * 		Dough
	 * @param s
	 * 		Shape
	 * @param f
	 * 		Filling (OPTIONAL)
	 * @param count
	 * 		Amount of cookies that should be baked
	 */
	public Position (Dough d, Shape s, Fill f, int count){
		//d != null; s !=null; count > 0
		dough = d;
		shape = s;
		filling = f;
		this.count = count;
		//dough != null; s != null; this.count > 0
	}
	
	/**
	 * @return
	 * 		Returns a String that describes the current position of cookies.
	 */
	@Author("Roman Puenguentzky")
	public String toString() {
		String temp = "Make " + count + " " + shape.toString() + " shaped cookies, made of " + dough.toString();
		
		if (filling != null) {
			temp += ", filled with " + filling.toString();
		}

		return temp;
	}
	
	/**
	 * @return
	 * 		Dough of the current position.
	 */
	@Author("Lajos-Zoltan Zsombori")
	public Dough getDough() {
		return dough;
	}
	
	/**
	 * @return
	 * 		Shape of the current position.
	 */
	@Author("Lajos-Zoltan Zsombori")
	public Shape getShape() {
		return shape;
	}
	
	/**
	 * @return
	 * 		Filling of the current position.
	 */
	@Author("Lajos-Zoltan Zsombori")
	public Fill getFill() {
		return filling;
	}
	
	/**
	 * @return
	 * 		Amount of cookies of the current position.
	 */
	@Author("Lajos-Zoltan Zsombori")
	public int getCount() {
		return count;
	}
	
}